package cn.tedu.kcircle.check.admin.adapter.converter;

import cn.tedu.dto.ContentUpdateCheckStateDTO;
import cn.tedu.kcircle.check.admin.protocol.param.CheckStateUpdateParam;
import cn.tedu.kcircle.check.admin.service.bo.CheckStateUpdateBO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public class CheckConverter implements Serializable {
    public ContentUpdateCheckStateDTO bo2ContentDTO(CheckStateUpdateBO checkStateUpdateBO){
        ContentUpdateCheckStateDTO contentUpdateCheckStateDTO = new ContentUpdateCheckStateDTO();
        contentUpdateCheckStateDTO.setId(checkStateUpdateBO.getResourceId());
        return contentUpdateCheckStateDTO;
    }
    public CheckStateUpdateBO param2BO(CheckStateUpdateParam checkStateUpdateParam){
        CheckStateUpdateBO checkStateUpdateBO = new CheckStateUpdateBO();
        BeanUtils.copyProperties(checkStateUpdateParam,checkStateUpdateBO);
        return checkStateUpdateBO;
    }

}
